Repository navigation
Re-check every mask fingerprint right before the manifest replacement - #202
Merged
Merged
Conversation
A run with verify_content off had no before_commit callback, so a mask changed after the staged-body check was published without mask_changed_during_run. Every run with masks now re-checks each mask fingerprint in before_commit; strict runs also keep their SHA-256 checks. Fixes #198 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #198
What and why
With
verify_contentoff (the explicit opt-out; the default is on since #159),_final_content_checkreturnedNone, so_commithad nobefore_commitcallback. The last mask fingerprint check ran in_publishbefore the report was written and the staged files were flushed. A mask that changed after it was published withoutmask_changed_during_run.Now every run that has masks re-checks each mask fingerprint (
changed_masks) inbefore_commit, right before the manifest replacement. A strict run does that plus its existing image and mask SHA-256 checks. A run without masks and withoutverify_contentstill has no callback. Image checks are unchanged (outside #198).Regression test
tests/test_mask_run_binding.py::test_a_mask_rewritten_after_the_staged_checks_is_not_published, parametrized over opt-out and strict. It rewrites a mask when the publication record is written, which is after the staged-body checks and beforebefore_commit.writtenis True, the rewritten mask was published); strict case passes (it already had the callback).Checks
python tools/check.py(ruff check, ruff format --check, pytest, code rules): 3937 passed, 4 skipped, 2 warnings. The 4 skips are existing platform skips (case-insensitive file system x3 variants, file-mode permissions as root).pipeline.pyis 570 lines (limit 600). CHANGELOG entry added; expect conflicts with other open PRs, keep both entries.Generated by Claude Code